package main.bots;

import java.awt.Toolkit;
import java.util.ArrayList;

import main.RSInter;
import main.constants.Constants;

public class Bank {
	
	public void depositAll() {
		ArrayList<Integer> temp = new ArrayList<Integer>();
		RSInter class9 = RSInter.interfaceCache[Constants.INTERFACE_INVENTORY];
		for(int i = 0; i < class9.inv.length; i++) {
			if(class9.inv[i] == -1) continue;
			if(temp.contains(class9.inv[i])) continue;
			depositItem(i, class9.inv[i]);
			try {
				Thread.sleep(500);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			//temp.add(class9.inv[i]);
		//Methods.getClientToUse().stream.createFrame(129);
		//Methods.getClientToUse().stream.method432(5064);
		//Methods.getClientToUse().stream.method432(j);
		//Methods.getClientToUse().stream.method432(i1);
	}
	
		
	}
	public void depositItem(int slot, int id) {
		Methods.getClientToUse().stream.fakeMouse();
		Methods.getClientToUse().stream.createFrame(129);
		Methods.getClientToUse().stream.method432(slot);
		Methods.getClientToUse().stream.writeWord(5064);
		Methods.getClientToUse().stream.method432(id);
	}
	public void depositAllExcept(int[] ids) {
		RSInter class9 = RSInter.interfaceCache[Constants.INTERFACE_INVENTORY];
		for(int i = 0; i < class9.inv.length; i++) {
			if(class9.inv[i] == -1) continue;
			for(int z = 0; z < ids.length; z++) {
				if(ids[z] == class9.inv[i] || ids[z] == class9.inv[i] - 1 || ids[z] == class9.inv[i] + 1) continue;
				depositItem(i, class9.inv[i]);
				
			}
			
		//Methods.getClientToUse().stream.createFrame(129);
		//Methods.getClientToUse().stream.method432(5064);
		//Methods.getClientToUse().stream.method432(j);
		//Methods.getClientToUse().stream.method432(i1);
	}
	}

}
